<template>
  <div style="padding:0.3rem 0.6rem" @click="pullUpAllFun()">
    <div class="IntelligentClassification">
      <div class="yx-condition clearfix">
        <div class="tc">V</div>
        <div class="yx-form-item clearfix">
          <div class="yx-form-inline yx-marginLeft92">
            <label class="yx-form-label">公司</label>
            <div class="yx-form-ul">
              <div class="delete" v-show="company_input!=''"
                   @click="inputClear('company_input','company_triggle')">X
              </div>
              <input type="text" v-model="company_input"
                     @click.stop="selectClick('company')" class="company_triggle">
              <transition name="fade">
                <div class="yx-form-inner-list" v-show="company_triggle">
                  <li v-for="item in companyData" @click="chooseListFun(item,'company')">
                    <nobr>{{item}}</nobr>
                  </li>
                  <!--<li v-show="query_get_item_big_classData.length==0" @click="choose_get_item_big_classFun('','')">空
                  </li>-->
                </div>
              </transition>
            </div>
          </div>
          <div class="yx-form-inline">
            <label class="yx-form-label">起始月份</label>
            <div class="yx-form-ul">
              <div class="delete ipt-clear" @click="clearDate1()">X</div>
              <input type="text" id="startDate" readonly>
            </div>
          </div>
          <div class="yx-form-inline">
            <label class="yx-form-label">结束月份</label>
            <div class="yx-form-ul">
              <div class="delete ipt-clear" @click="clearDate2()">X</div>
              <input type="text" id="endDate" readonly>
            </div>
          </div>
          <div class="fr">
            <button class="yx-btn-yellow" @click="queryFun()">查询</button>
            <button class="yx-btn-grey" @click="clearCondition()">重置</button>
          </div>
        </div>
      </div>
      <div class="yx-content">
        <div class="yx-label">原材料整体库存水平</div>
        <div class="yx-cover" id="cover1"></div>
      </div>
    </div>
  </div>
</template>

<script>
  import calender from '../common/js/calenderMonth';
  import common from '../common/js/common';

  var echarts = require('echarts');
  export default {
    watch: {
      company_triggle: function () {
        if (!this.company_triggle) {
          $('.company_triggle').blur();
        }
      },


      //大华
      itemClassSelectVal: function () {
        if (this.itemClassSelectVal == '按供应商类别筛选') {
          this.itemCategory();
        } else {
          this.itemCategory();//需要改动，模糊搜索
        }
      },
      query_get_item_big_class_input: function () {//大类
        if (this.query_get_item_big_class_input == '') {
          this.query_get_item_big_class_input_delete = false;
          this.disabledInput = true;
        } else {
          this.query_get_item_big_class_input_delete = true;
          this.disabledInput = false;
        }
        this.query_get_item_big_classFun();
      },
      query_get_item_small_class_input: function () {//小类
        if (this.query_get_item_small_class_input == '') {
          this.query_get_item_small_class_input_delete = false;
        } else {
          this.query_get_item_small_class_input_delete = true;
        }
        this.query_get_item_small_classFun();
      },
      query_get_item_input: function () {//物料编号
        if (this.query_get_item_input == '') {
          this.query_get_item_input_delete = false;
        } else {
          this.query_get_item_input_delete = true;
        }
        this.query_get_itemFun();
      },
      query_get_plan_class_input: function () {//计划类别
        if (this.query_get_plan_class_input == '') {
          this.query_get_plan_class_input_delete = false;
        } else {
          this.query_get_plan_class_input_delete = true;
        }
      },
      query_get_item_category_input: function () {
        if (this.query_get_item_category_input == '') {
          this.query_get_item_category_input_delete = false;
        } else {
          this.query_get_item_category_input_delete = true;
        }
      },
      query_get_buyer_input: function () {//采购员
        if (this.query_get_buyer_input == '') {
          this.query_get_buyer_input_delete = false;
        } else {
          this.query_get_buyer_input_delete = true;
        }
        this.query_get_buyerFun();
      },
      query_get_sourcing_input: function () {//sourcing
        if (this.query_get_sourcing_input == '') {
          this.query_get_sourcing_input_delete = false;
        } else {
          this.query_get_sourcing_input_delete = true;
        }
        this.query_get_sourcingFun()
      },
      query_get_planner_input: function () {//计划员
        if (this.query_get_planner_input == '') {
          this.query_get_planner_input_delete = false;
        } else {
          this.query_get_planner_input_delete = true;
        }
        this.query_get_plannerFun()
      },
    },
    mounted() {
      common.selectDate1('#startDate');
      common.selectDate1('#endDate');
      this.companyFun();
      this.overviewFun();
    },
    data() {
      return {
        colorList:['red','blue','yellow'],
        company_input: '',
        company_triggle: false,
        company_input_delete: false,
        condition_startDate: '',
        condition_endDate: '',
        companyData: {},//下拉框公司列表
        overviewData:{},//总览总数据
        cover1Option:{
          tooltip: {
            trigger: 'axis',
            /* formatter: function (params) {
             var paramsItem='';
             for(var i=0;i<params.length;i++){
             paramsItem=paramsItem+params[i].seriesName + '：' + params[i].data[1].toFixed(2)+'</br>'
             }
             return (params[0].data[0]+'</br>'+paramsItem)
             },*/
          },
          legend: {
            data: []
          },
          grid: {
            show: true,
            top: '50',
            left: '4%',
            right: '4%',
            bottom: '50',
            borderWidth: 0
          },
          dataZoom: [{
            show: true,
            height: 20,
            xAxisIndex: [0],
            bottom: 0,
            start: 0,
            end: 100,
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            handleStyle: {
              color: "#d3dee5",

            },
            textStyle: {
              color: "#fff"
            },
            borderColor: "#90979c"
          }, {
            type: 'inside',
            show: true,
            height: 15,
            start: 1,
            end: 35
          }],
          xAxis: {
            type: 'category',
            data: [],
            name: '时间',
          },
          yAxis: [{
            name: '',
            type: 'value',
            splitLine: {
              lineStyle: {
                color: '#eee'
              }
            },
            axisLabel: {
              /*formatter:function(v){
               return $scope.allFun.wan(v);
               }*/
            }
          }],
          series: []
        },



        //大华
        tableTrClick: -1,
        showDate1: false,
        showDate2: false,
        configShow: 1,
        numFix1: common.tofixeds,
        disabledInput: true,
        isActive: true,
        colorList: [
          '#1fbb61', '#ffbe4c', '#fc7470', '#56b5f1', '#837df5', '#1acfc9', '#d275f4'
        ],
        optionPie: {
          tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)",
            confine: true
          },
          color: ['#ffbe4c', '#fc7470', '#56b5f1', '#51d489'],
          series: {
            name: '供应商分类占比',
            type: 'pie',
            radius: '90%',
            center: ['50%', '50%'],
            label: {
              normal: {
                show: false
              }
            },
            data: [
              {value: [], name: 'I类'},
              {value: [], name: 'II类'},
              {value: [], name: 'III类'},
            ],
            itemStyle: {
              normal: {
                borderWidth: 1,
                borderColor: 'white'
              },
              emphasis: {
                shadowBlur: 5,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        },
        optionBarLine: {
          tooltip: {
            trigger: 'axis',
            /* formatter: function (params) {
             var paramsItem='';
             for(var i=0;i<params.length;i++){
             paramsItem=paramsItem+params[i].seriesName + '：' + params[i].data[1].toFixed(2)+'</br>'
             }
             return (params[0].data[0]+'</br>'+paramsItem)
             },*/
          },
          legend: {
            data: []
          },
          grid: {
            show: true,
            top: '50',
            left: '4%',
            right: '4%',
            bottom: '50',
            /*backgroundColor:'#fafafa',*/
            borderWidth: 0
          },
          dataZoom: [{
            show: true,
            height: 20,
            xAxisIndex: [0],
            bottom: 0,
            start: 0,
            end: 100,
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            handleStyle: {
              color: "#d3dee5",

            },
            textStyle: {
              color: "#fff"
            },
            borderColor: "#90979c"
          }, {
            type: 'inside',
            show: true,
            height: 15,
            start: 1,
            end: 35
          }],
          xAxis: {
            type: 'category',
            data: [],
            name: '时间',
          },
          yAxis: [{
            name: '',
            type: 'value',
            splitLine: {
              lineStyle: {
                color: '#eee'
              }
            },
            axisLabel: {
              /*formatter:function(v){
               return $scope.allFun.wan(v);
               }*/
            }
          }],
          series: []
        },
        selectListName: [
          'query_get_item_big_class',
          'query_get_item_small_class',
          'query_get_item',
          'query_get_plan_class',
          'query_get_item_category',
          'query_get_buyer',
          'query_get_sourcing',
          'query_get_planner',
          'query_get_vendor'
        ],
        certainItem: 'all',
        certainItemName: '全部物料',

        query_get_item_big_class: false,
        query_get_item_big_class_input: '',
        query_get_item_big_class_input_id: '',
        query_get_item_big_class_input_boss: '',
        query_get_item_big_class_input_delete: false,
        query_get_item_big_classData: [],//下拉框--库存大类

        query_get_item_small_class: false,
        query_get_item_small_class_input: '',
        query_get_item_small_class_input_id: '',
        query_get_item_small_class_input_boss: '',
        query_get_item_small_class_input_delete: false,
        query_get_item_small_classData: [],//下拉框--库存小类

        query_get_item: false,
        query_get_item_input: '',
        query_get_item_input_id: '',
        query_get_item_input_boss: '',
        query_get_item_input_delete: false,
        query_get_itemData: [],//下拉框--物料编号

        query_get_plan_class: false,
        query_get_plan_class_input: '',
        query_get_plan_class_input_id: '',
        query_get_plan_class_input_boss: '',
        query_get_plan_class_input_delete: false,
        query_get_plan_classData: [],//下拉框--计划类别

        query_get_item_category: false,
        query_get_item_category_input: '',
        query_get_item_category_input_id: '',
        query_get_item_category_input_boss: '',
        query_get_item_category_input_delete: false,
        query_get_item_categoryData: [],//下拉框--智能分类

        query_get_buyer: false,
        query_get_buyer_input: '',
        query_get_buyer_input_id: '',
        query_get_buyer_input_boss: '',
        query_get_buyer_input_delete: false,
        query_get_buyerData: [],//下拉框--采购员

        query_get_sourcing: false,
        query_get_sourcing_input: '',
        query_get_sourcing_input_id: '',
        query_get_sourcing_input_boss: '',
        query_get_sourcing_input_delete: false,
        query_get_sourcingData: [],//下拉框--sourcing

        query_get_planner: false,
        query_get_planner_input: '',
        query_get_planner_input_id: '',
        query_get_planner_input_boss: '',
        query_get_planner_input_delete: false,
        query_get_plannerData: [],//下拉框--计划员
        condition_startDate: '',
        condition_endDate: '',

        feedback_item_queryData: {},
        feedback_inventory_queryData: {},//日均库存图数据
        feedback_fullfillment_queryData: [],
        feedback_turnover_queryData: [],
        feedback_lifetime_overviewData: [],//库龄分析图数据
        feedback_lifetime_overviewData_A: {},
        feedback_lifetime_overviewData_B: {},
        feedback_lifetime_overviewData_C: {},
        feedback_lifetime_overviewData_D: {},
        feedback_lifetime_categoryData: [],//库龄分析表数据
        itemqueryIsLoading: true,
        itemqueryIsError: false,
        feedbackInventoryIsLoading: true,
        feedbackInventoryIsError: false,
        fullfillmentIsLoading: true,
        fullfillmentIsError: false,
        turnoverIsLoading: true,
        turnoverIsError: false,
        lifetimeIsLoading: true,
        lifetimeIsError: false,
        opoIsLoading: true,
        opoIsError: false,
        lifetime_overviewIsLoading: true,
        lifetime_overviewIsError: false,
        lifetimeCategoryIsLoading: true,
        lifetimeCategoryIsError: false,
        iptPage: 1,
        iptPage1: 1,
        firstTime: true,
      }
    },
    methods: {
      /*下拉框选定某个*/
      chooseListFun: function (value, who) {
        var _self = this;
        var _inputModel = who + '_input';
        _self[_inputModel] = value;
      },
      /*INPUT自带的×*/
      inputClear: function (who, triggle) {
        var _self = this;
        _self[who] = '';
        if (_self[triggle]) {
          _self[triggle] = false;
        }
      },
      /*置空*/
      clearCondition: function () {
        $('#startDate').prev('.ipt-clear').hide();
        $('#endDate').prev('.ipt-clear').hide();
        $('#startDate').attr("date", "");
        $('#startDate').val('');
        $('#endDate').attr("date", "");
        $('#endDate').val('');
        this.condition_startDate = '';
        this.condition_endDate = '';

      },
      //全收起
      pullUpAllFun: function () {
        this.company_triggle = false;
      },
      /*获取下拉框公司列表*/
      companyFun: function () {
        var _self = this;
        this.$http.get(common.url_constitute.company).then(function (d) {
          if (d.data.code == 0) {
            _self.companyData = d.data.content.overview_company;
          }
        })
      },
      /*总览*/
      overviewFun: function () {
        var _self = this;
        this.$http.post(common.url_constitute.analysis_overview,{
          "account_num": ["sxzd", "xczd"],
          "start_month": "2015-11",
          "end_month":"2017-11"
        }).then(function (d) {
          console.log(d);
          if (d.data.code == 0) {
            _self.overviewData = d.data.content;
            var cover1=echarts.init(document.getElementById('cover1'));
            this.cover1Option.xAxis=_self.overviewData.overview_endinv[0].year_month;
            for(var i=0;i<_self.overviewData.overview_endinv.length;i++){
              var cover1Content = {
                name: _self.overviewData.overview_endinvcd [i].account_num,
                type: 'line',
                itemStyle: {
                  normal: {
                    color: _self.colorList[i],
                  }
                },
                lineStyle: {
                  normal: {
                    color: _self.colorList[i],
                  }
                },
                data: _self.overviewData.overview_endinv[i].sum_endinv
              };
              this.cover1Option.series.push(cover1Content)
            }
            cover1.setOption(this.cover1Option,true);
          }
        })
      },




      //大华
      feedback_item_query_TR: function (index, id, name) {
        if (this.tableTrClick != index) {
          this.tableTrClick = index;
          this.certainItem = id;
          this.certainItemName = name;
        } else {
          this.certainItem = 'all';
          this.certainItemName = '全部物料';
          this.tableTrClick = !this.tableTrClick;
        }
        this.chooseItem();
      },
      setDateList: function (date) {
        /*return common.setDateList(x)*/
        for (var i = 0; i < date.length; i++) {
          date[i] = date[i].substr(0, 10);
        }
        return date;
      },
      selectClick: function (x) {
        var _self = this;
        var funName = x + 'Fun';
        _self.company_triggle = !_self.company_triggle;
        /*if(x=='query_get_item_category'){

         }else{
         _self[funName]();
         }
         for (var i = 0; i < _self.selectListName.length; i++) {
         var yy = _self.selectListName[i];
         yy == x ? _self[x] = !_self[x] : _self[yy] = false;
         }*/
      },
      selectSlideUp2: function () {
        var _self = this;
        for (var i = 0; i < _self.selectListName.length; i++) {
          var yx = _self.selectListName[i];
          _self[yx] = false;
        }
      },
      /*下拉框--库存大类*/
      query_get_item_big_classFun: function () {
        var _self = this;
        var yx_data = {
          "dim": this.query_get_item_big_class_input.indexOf(' ') > -1 ? this.query_get_item_big_class_input.split(' ')[1] : this.query_get_item_big_class_input
        }
        common.getData(-1, common.url_constitute.query_get_item_big_class, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_item_big_classData = d.data.result;
          }
        })
      },
      /*下拉框--库存大类--选择*/
      choose_get_item_big_classFun: function (name, num) {
        this.query_get_item_big_class_input = num + ' ' + name;
        this.query_get_item_big_class_input_id = num;
        this.selectSlideUp2();
        this.query_get_item_small_classFun();
      },
      /*下拉框--库存小类*/
      query_get_item_small_classFun: function () {
        var _self = this;
        var yx_data = {
          "big_class": this.query_get_item_big_class_input.indexOf(' ') > -1 ? this.query_get_item_big_class_input.split(' ')[0] : this.query_get_item_big_class_input,
          "dim": this.query_get_item_small_class_input.indexOf(' ') > -1 ? this.query_get_item_small_class_input.split(' ')[1] : this.query_get_item_small_class_input
        }
        common.getData(-1, common.url_constitute.query_get_item_small_class, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_item_small_classData = d.data.result;
          }
        })
      },
      /*下拉框--库存小类--选择*/
      choose_get_item_small_classFun: function (name, num) {
        this.query_get_item_small_class_input = num + ' ' + name;
        this.query_get_item_small_class_input_id = num;
        this.selectSlideUp2();
        this.query_get_itemFun();
      },
      /*下拉框--物料编号*/
      query_get_itemFun: function () {
        var _self = this;
        var yx_data = {
          "big_class": this.query_get_item_big_class_input.indexOf(' ') > -1 ? this.query_get_item_big_class_input.split(' ')[0] : this.query_get_item_big_class_input,
          "small_class": this.query_get_item_small_class_input.indexOf(' ') > -1 ? this.query_get_item_small_class_input.split(' ')[0] : this.query_get_item_small_class_input,
          "dim": this.query_get_item_input
        }
        common.getData(-1, common.url_constitute.query_get_item, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_itemData = d.data.result;
          }
        })
      },
      /*下拉框--物料编号--选择*/
      choose_get_itemFun: function (name, num) {
        this.query_get_item_input = name;
        this.query_get_item_input_id = num;
        this.selectSlideUp2();
      },
      /*下拉框--计划类别*/
      query_get_plan_classFun: function () {
        var _self = this;
        var yx_data = {};
        common.getData(-1, common.url_constitute.query_get_plan_class, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_plan_classData = d.data.result;
          }
        })
      },
      /*下拉框--计划类别--选择*/
      choose_get_plan_classFun: function (name, num) {
        this.query_get_plan_class_input = name;
        this.query_get_plan_class_input_id = num;
        this.selectSlideUp2();
      },
      /*下拉框--智能分类*/
      query_get_item_categoryFun: function () {
        var _self = this;
        var yx_data = {
          "dim": this.query_get_item_category_input == '' ? '' : this.query_get_item_category_input,
        };
        common.getData(-1, common.url_constitute.query_get_item_category, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_item_categoryData = d.data.result;
          }
        })
      },
      /*下拉框--智能分类--选择*/
      choose_query_get_item_categoryFun: function (name, num) {
        this.query_get_item_category_input = name;
        this.query_get_item_category_input_id = num;
        this.selectSlideUp2();
      },
      /*下拉框--采购员*/
      query_get_buyerFun: function () {
        var _self = this;
        var yx_data = {
          "dim": this.query_get_buyer_input.indexOf(' ') > -1 ? this.query_get_buyer_input.split(' ')[1] : this.query_get_buyer_input,
        };
        common.getData(-1, common.url_constitute.query_get_buyer, "post", yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_buyerData = d.data.result;
          }
        })
      },
      /*下拉框--采购员--选择*/
      choose_query_get_buyerFun: function (name, num) {
        this.query_get_buyer_input = num + ' ' + name;
        this.query_get_buyer_input_id = num;
        this.selectSlideUp2();
      },
      /*下拉框--sourcing*/
      query_get_sourcingFun: function () {
        var _self = this;
        var yx_data = {
          "dim": this.query_get_sourcing_input.indexOf(' ') > -1 ? this.query_get_sourcing_input.split(' ')[1] : this.query_get_sourcing_input,
        };
        common.getData(-1, common.url_constitute.query_get_sourcing, 'post', yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_sourcingData = d.data.result;
          }
        });
      },
      /*下拉框--sourcing--选择*/
      choose_query_get_sourcingFun: function (name, num) {
        this.query_get_sourcing_input = num + ' ' + name;
        this.query_get_sourcing_input_id = num;
        this.selectSlideUp2();
      },
      /*下拉框--计划员*/
      query_get_plannerFun: function () {
        var _self = this;
        var yx_data = {
          "dim": this.query_get_planner_input.indexOf(' ') > -1 ? this.query_get_planner_input.split(' ')[1] : this.query_get_planner_input,
        };
        common.getData(-1, common.url_constitute.query_get_planner, 'post', yx_data, function (d) {
          if (d.data.code == 1024) {
            _self.query_get_plannerData = d.data.result;
          }
        })
      },
      /*下拉框--计划员--选择*/
      choose_query_get_plannerFun: function (name, num) {
        this.query_get_planner_input = num + ' ' + name;
        this.query_get_planner_input_id = num;
        this.selectSlideUp2();
      },


      clearDate1: function () {
        $('#startDate').attr("date", "");
        $('#startDate').val('');
        this.condition_startDate = '';
      },
      clearDate2: function () {
        $('#endDate').attr("date", "");
        $('#endDate').val('');
        this.condition_endDate = '';
      },
      queryFun: function () {
        this.query_get_item_big_class_input_boss = this.query_get_item_big_class_input_id;
        this.query_get_item_small_class_input_boss = this.query_get_item_small_class_input_id;
        this.query_get_item_input_boss = this.query_get_item_input_id;
        this.query_get_plan_class_input_boss = this.query_get_plan_class_input_id;
        this.query_get_item_category_input_boss = this.query_get_item_category_input_id;
        this.query_get_buyer_input_boss = this.query_get_buyer_input_id;
        this.query_get_sourcing_input_boss = this.query_get_sourcing_input_id;
        this.query_get_planner_input_boss = this.query_get_planner_input_id;
        this.condition_startDate = $('#startDate').attr("date");
        this.condition_endDate = $('#endDate').attr("date");

        this.firstTime = true;
        this.certainItem = 'all';
        this.certainItemName = '全部物料';
        this.feedback_item_queryFun();
        if (this.configShow == 1) {
          this.feedback_inventory_queryFun();
        } else if (this.configShow == 2) {
          this.feedback_fullfillment_queryFun();
        } else if (this.configShow == 3) {
          this.feedback_turnover_queryFun();
        } else if (this.configShow == 4) {
          this.feedback_lifetime_queryFun();
        } else if (this.configShow == 5) {
          this.feedback_opo_queryFun();
        } else {
          this.feedback_lifetime_overviewFun();
          this.feedback_lifetime_categoryFun();
        }
      },
      chooseItem: function () {
        if (this.configShow == 1) {
          this.feedback_inventory_queryFun();
        } else if (this.configShow == 2) {
          this.feedback_fullfillment_queryFun();
        } else if (this.configShow == 3) {
          this.feedback_turnover_queryFun();
        } else if (this.configShow == 4) {
          this.feedback_lifetime_queryFun();
        } else if (this.configShow == 5) {
          this.feedback_opo_queryFun();
        } else {
          this.feedback_lifetime_overviewFun();
          this.feedback_lifetime_categoryFun();
        }
      },
      /*智能反馈--item表数据*/
      feedback_item_queryFun: function (page, oldPage) {
        var _self = this;
        _self.itemqueryIsLoading = true;
        if (typeof page == "undefined") {
          page = 1;
        }
        if (page != oldPage) {
          var yx_data = {
            "category": this.query_get_item_category_input_boss,
            "item": this.query_get_item_input_boss,
            "plan_class": this.query_get_plan_class_input_boss,
            "sourcing": this.query_get_sourcing_input_boss,
            "item_big_class": this.query_get_item_big_class_input_boss,
            "item_small_class": this.query_get_item_small_class_input_boss,
            "planner": this.query_get_planner_input_boss,
            "buyer": this.query_get_buyer_input_boss,
            "start_date": this.condition_startDate,
            "end_date": this.condition_endDate,
            page: page
          }
          common.getData(0, common.url_constitute.feedback_item_query, 'post', yx_data, function (d) {
            _self.itemqueryIsLoading = false;
            if (d.data.code == 1024) {
              _self.feedback_item_queryData = d.data.item_dst;
              if (_self.feedback_item_queryData.total < 1) {
                _self.itemqueryIsError = true;
              } else {
                _self.itemqueryIsError = false;
              }
            } else if (d.data.code == 9007) {
              _self.itemqueryIsError = true;
            }
          })
        }
      },
      /*智能反馈--日均库存--feedback_inventory_query*/
      feedback_inventory_queryFun: function () {
        var _self = this;
        _self.feedbackInventoryIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(1, common.url_constitute.feedback_inventory_query, 'post', yx_data, function (d) {
          _self.feedbackInventoryIsLoading = false;
          if (d.data.code == 1024) {
            _self.feedback_inventory_queryData = d.data.inventory_contrast_dst;
            if (_self.feedback_inventory_queryData.TRANSACTION_DATE.length < 1) {
              _self.feedbackInventoryIsError = true;
            } else {
              _self.feedbackInventoryIsError = false;
              var optionFeedbackInventoryQuery = {
                tooltip: {
                  trigger: 'axis',
                  formatter: function (params) {
                    var tpl = '';
                    tpl = params[0].axisValue;
                    for (var i = 0; i < params.length; i++) {
                      tpl = tpl + '<br/>' + params[i].marker + params[i].seriesName + '：' + common.numThousand(params[i].value)
                    }
                    return tpl
                  }
                },
                legend: {
                  data: ["优化模型金额", '实际金额', '优化模型数量', '实际数量']
                },
                grid: {
                  show: true,
                  top: '50',
                  left: '4%',
                  right: '4%',
                  bottom: '50',
                  borderWidth: 0
                },
                dataZoom: [{
                  show: true,
                  height: 20,
                  xAxisIndex: [0],
                  bottom: 0,
                  start: 0,
                  end: 100,
                  handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                  handleSize: '110%',
                  handleStyle: {
                    color: "#d3dee5",

                  },
                  textStyle: {
                    color: "#fff"
                  },
                  borderColor: "#90979c"
                }, {
                  type: 'inside',
                  show: true,
                  height: 15,
                  start: 1,
                  end: 35
                }],
                xAxis: {
                  type: 'category',
                  data: common.setDateMonList(_self.feedback_inventory_queryData.TRANSACTION_DATE),
                  name: '时间',
                },
                yAxis: [{
                  name: '金额/元',
                  type: 'value',
                  splitLine: {
                    show: false,
                    lineStyle: {
                      color: '#eee'
                    }
                  },
                  axisLabel: {
                    formatter: function (v) {
                      return common.wan(v);
                    }
                  }
                }, {
                  type: 'value',
                  name: '数量',
                  splitLine: {
                    show: false,
                  },
                  axisLabel: {
                    formatter: function (v) {
                      return common.wan(v);
                    }
                  }
                }],
                series: []
              };
              var seriesFeedbackInventoryQuery = [{
                name: '优化模型数量',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#1fbb61'
                  }
                },
                yAxisIndex: 1,
                data: _self.feedback_inventory_queryData.PREDICT_QUANTITY
              }, {
                name: '实际数量',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#ffbe4c'
                  }
                },
                yAxisIndex: 1,
                data: _self.feedback_inventory_queryData.ACTUAL_QUANTITY
              }, {
                name: '优化模型金额',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#fc7470'
                  }
                },
                data: _self.feedback_inventory_queryData.PREDICT_VALUE
              }, {
                name: '实际金额',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#56b5f1'
                  }
                },
                data: _self.feedback_inventory_queryData.ACTUAL_VALUE
              }]
              optionFeedbackInventoryQuery.series = seriesFeedbackInventoryQuery;
              var containerFeedbackInventoryQuery = echarts.init(document.getElementById('container_feedbackInventoryQuery'));
              containerFeedbackInventoryQuery.setOption(optionFeedbackInventoryQuery, true);
              window.addEventListener("resize", function () {
                containerFeedbackInventoryQuery.resize();
              })
            }
          } else if (d.data.code == 9007) {
            _self.feedbackInventoryIsError = true;
          }
        })
      },
      /*智能反馈--需求满足率--feedback_fullfillment_query*/
      feedback_fullfillment_queryFun: function () {
        var _self = this;
        _self.fullfillmentIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(2, common.url_constitute.feedback_fullfillment_query, 'post', yx_data, function (d) {
          _self.fullfillmentIsLoading = false;
          if (d.data.code == 1024) {
            _self.feedback_fullfillment_queryData = d.data.fullfillment_dst;
            if (_self.feedback_fullfillment_queryData.transaction_date.length < 1) {
              _self.fullfillmentIsError = true;
            } else {
              _self.fullfillmentIsError = false;
              var optionFullfillment = {
                tooltip: {
                  trigger: 'axis',
                  formatter: function (params) {
                    var tpl = '';
                    tpl = params[0].axisValue;
                    for (var i = 0; i < params.length; i++) {
                      tpl = tpl + '<br/>' + params[i].marker + params[i].seriesName + '：' + common.numThousand(params[i].value * 100) + '%'
                    }
                    return tpl
                  }
                },
                legend: {
                  data: ['实际满足率', '优化模型满足率'],
                },
                grid: {
                  show: true,
                  top: '50',
                  left: '4%',
                  right: '4%',
                  bottom: '50',
                  /*backgroundColor:'#fafafa',*/
                  borderWidth: 0
                },
                dataZoom: [{
                  show: true,
                  height: 20,
                  xAxisIndex: [0],
                  bottom: 0,
                  start: 0,
                  end: 100,
                  handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                  handleSize: '110%',
                  handleStyle: {
                    color: "#d3dee5",

                  },
                  textStyle: {
                    color: "#fff"
                  },
                  borderColor: "#90979c"
                }, {
                  type: 'inside',
                  show: true,
                  height: 15,
                  start: 1,
                  end: 35
                }],
                xAxis: {
                  type: 'category',
                  data: common.setDateMonList(_self.feedback_fullfillment_queryData.transaction_date),
                  name: '时间',
                },
                yAxis: [{
                  name: '百分比',
                  type: 'value',
                  splitLine: {
                    lineStyle: {
                      color: '#eee'
                    }
                  },
                  axisLabel: {
                    formatter: function (params) {
                      params = params * 100 + '%';
                      return params
                    }
                  }
                }],
                series: []
              };
              optionFullfillment.series = [{
                name: '实际满足率',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#1fbb61'
                  }
                },
                data: _self.feedback_fullfillment_queryData.actual_fullfillment
              }, {
                name: '优化模型满足率',
                type: 'line',
                itemStyle: {
                  normal: {
                    color: '#56b5f1'
                  }
                },
                data: _self.feedback_fullfillment_queryData.predict_fullfullment
              }];
              var containerFullfillment = echarts.init(document.getElementById('container_fullfillment'));
              containerFullfillment.setOption(optionFullfillment, true);
              window.addEventListener("resize", function () {
                containerFullfillment.resize();
              })
            }
          } else if (d.data.code == 9007) {
            _self.fullfillmentIsError = true;
          }
        })
      },
      /*智能反馈--年周转率--feedback_turnover_query*/
      feedback_turnover_queryFun: function () {
        var _self = this;
        _self.turnoverIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(3, common.url_constitute.feedback_turnover_query, 'post', yx_data, function (d) {
          _self.turnoverIsLoading = false;
          if (d.data.code == 1024) {
            _self.feedback_turnover_queryData = d.data.predict_turnover_dst;
            if (_self.feedback_turnover_queryData.TRANSACTION_DATE.length < 1) {
              _self.turnoverIsError = true;
            } else {
              _self.turnoverIsError = false;
              var optionTurnover = {
                tooltip: {
                  trigger: 'axis',
                  formatter: function (params) {
                    var tpl = '';
                    tpl = params[0].axisValue;
                    for (var i = 0; i < params.length; i++) {
                      tpl = tpl + '<br/>' + params[i].marker + params[i].seriesName + '：' + common.numThousand(params[i].value)
                    }
                    return tpl
                  }
                },
                legend: {
                  data: ['实际周转率', '优化模型周转率']
                },
                grid: {
                  show: true,
                  top: '50',
                  left: '4%',
                  right: '4%',
                  bottom: '50',
                  borderWidth: 0
                },
                dataZoom: [{
                  show: true,
                  height: 20,
                  xAxisIndex: [0],
                  bottom: 0,
                  start: 0,
                  end: 100,
                  handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                  handleSize: '110%',
                  handleStyle: {
                    color: "#d3dee5",

                  },
                  textStyle: {
                    color: "#fff"
                  },
                  borderColor: "#90979c"
                }, {
                  type: 'inside',
                  show: true,
                  height: 15,
                  start: 1,
                  end: 35
                }],
                xAxis: {
                  type: 'category',
                  data: common.setDateMonList(_self.feedback_turnover_queryData.TRANSACTION_DATE),
                  name: '时间',
                },
                yAxis: [{
                  name: '年周转率',
                  type: 'value',
                  splitLine: {
                    lineStyle: {
                      color: '#eee'
                    }
                  },
                  axisLabel: {
                    formatter: function (params) {
                      params = params.toFixed(2);
                      return params
                    }
                  }
                }],
                series: [{
                  name: '优化模型周转率',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#1fbb61'
                    }
                  },
                  data: _self.feedback_turnover_queryData.actual_turnover
                }, {
                  name: '实际周转率',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#56b5f1'
                    }
                  },
                  data: _self.feedback_turnover_queryData.predict_turnover
                }]
              };
              var containerTurnover = echarts.init(document.getElementById('container_turnover'));
              containerTurnover.setOption(optionTurnover, true);
              window.addEventListener("resize", function () {
                containerTurnover.resize();
              })
            }
          } else if (d.data.code == 9007) {
            _self.turnoverIsError = true;
          }
        })
      },
      /*智能反馈--库龄--feedback_lifetime_query*/
      feedback_lifetime_queryFun: function () {
        var _self = this;
        _self.lifetimeIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(4, common.url_constitute.feedback_lifetime_query, 'post', yx_data, function (d) {
          _self.lifetimeIsLoading = false;
          if (d.data.code == 1024) {
            _self.feedback_lifetime_queryData = d.data.lifetime_dst;
            if (_self.feedback_lifetime_queryData.transaction_date.length < 1) {
              _self.lifetimeIsError = true;
            } else {
              _self.lifetimeIsError = false;
              var optionLifetime = {
                tooltip: {
                  trigger: 'axis',
                  formatter: function (params) {
                    var tpl = '';
                    tpl = params[0].axisValue;
                    for (var i = 0; i < params.length; i++) {
                      tpl = tpl + '<br/>' + params[i].marker + params[i].seriesName + '：' + common.numThousand(params[i].value)
                    }
                    return tpl
                  }
                },
                legend: {
                  data: ['实际库龄', '优化模型库龄']
                },
                grid: {
                  show: true,
                  top: '50',
                  left: '4%',
                  right: '4%',
                  bottom: '50',
                  borderWidth: 0
                },
                dataZoom: [{
                  show: true,
                  height: 20,
                  xAxisIndex: [0],
                  bottom: 0,
                  start: 0,
                  end: 100,
                  handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                  handleSize: '110%',
                  handleStyle: {
                    color: "#d3dee5",

                  },
                  textStyle: {
                    color: "#fff"
                  },
                  borderColor: "#90979c"
                }, {
                  type: 'inside',
                  show: true,
                  height: 15,
                  start: 1,
                  end: 35
                }],
                xAxis: {
                  type: 'category',
                  data: common.setDateMonList(_self.feedback_lifetime_queryData.transaction_date),
                  name: '时间',
                },
                yAxis: [{
                  name: '天数',
                  type: 'value',
                  splitLine: {
                    lineStyle: {
                      color: '#eee'
                    }
                  },
                  axisLabel: {
                    formatter: function (params) {
                      return common.wan(params);
                    }
                  }
                }],
                series: [{
                  name: '实际库龄',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#1fbb61'
                    }
                  },
                  data: _self.feedback_lifetime_queryData.actual_life_time
                }, {
                  name: '优化模型库龄',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#56b5f1'
                    }
                  },
                  data: _self.feedback_lifetime_queryData.predict_lift_time
                }]
              };
              var containerLifetime = echarts.init(document.getElementById('container_lifetime'));
              containerLifetime.setOption(optionLifetime, true);
              window.addEventListener("resize", function () {
                containerLifetime.resize();
              })
            }
          } else if (d.data.code == 9007) {
            _self.lifetimeIsError = true;
          }
        })
      },
      /*智能反馈-opo--feedback_OPO_query*/
      feedback_opo_queryFun: function () {
        var _self = this;
        _self.opoIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(5, common.url_constitute.feedback_opo_query, 'post', yx_data, function (d) {
          _self.opoIsLoading = false;
          if (d.data.code == 1024) {
            _self.feedback_opo_queryData = d.data.opo_contrast_dst;
            if (_self.feedback_opo_queryData.transaction_date.length < 1) {
              _self.opoIsError = true;
            } else {
              _self.opoIsError = false;
              var optionOPO = {
                tooltip: {
                  trigger: 'axis',
                  formatter: function (params) {
                    var tpl = '';
                    tpl = params[0].axisValue;
                    for (var i = 0; i < params.length; i++) {
                      tpl = tpl + '<br/>' + params[i].marker + params[i].seriesName + '：' + common.numThousand(params[i].value)
                    }
                    return tpl
                  }
                },
                legend: {
                  data: ['实际OPO数量', '优化模型OPO数量', '实际OPO价值', '优化模型OPO价值'],
                },
                grid: {
                  show: true,
                  top: '50',
                  left: '4%',
                  right: '4%',
                  bottom: '50',
                  borderWidth: 0
                },
                dataZoom: [{
                  show: true,
                  height: 20,
                  xAxisIndex: [0],
                  bottom: 0,
                  start: 0,
                  end: 100,
                  handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                  handleSize: '110%',
                  handleStyle: {
                    color: "#d3dee5",

                  },
                  textStyle: {
                    color: "#fff"
                  },
                  borderColor: "#90979c"
                }, {
                  type: 'inside',
                  show: true,
                  height: 15,
                  start: 1,
                  end: 35
                }],
                xAxis: {
                  type: 'category',
                  data: common.setDateMonList(_self.feedback_opo_queryData.transaction_date),
                  name: '时间',
                },
                yAxis: [{
                  name: '金额',
                  type: 'value',
                  splitLine: {
                    show: false,
                    lineStyle: {
                      color: '#eee'
                    }
                  },
                  axisLabel: {
                    formatter: function (v) {
                      return common.wan(v);
                    }
                  }
                }, {
                  type: 'value',
                  name: '数量',
                  splitLine: {show: false},
                  axisLabel: {
                    formatter: function (params) {
                      return common.numThousand(params)
                    }
                  }
                }],
                series: [{
                  name: '实际OPO数量',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#ffbe4c'
                    }
                  },
                  yAxisIndex: 1,
                  data: _self.feedback_opo_queryData.actual_opo
                }, {
                  name: '优化模型OPO数量',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#51d489'
                    }
                  },
                  yAxisIndex: 1,
                  data: _self.feedback_opo_queryData.predict_opo
                }, {
                  name: '实际OPO价值',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#fc7470'
                    }
                  },
                  yAxisIndex: 0,
                  data: _self.feedback_opo_queryData.actual_opo_value
                }, {
                  name: '优化模型OPO价值',
                  type: 'line',
                  itemStyle: {
                    normal: {
                      color: '#56b5f1'
                    }
                  },
                  yAxisIndex: 0,
                  data: _self.feedback_opo_queryData.predict_opo_value
                }]
              };
              var containerOPO = echarts.init(document.getElementById('container_OPO'));
              containerOPO.setOption(optionOPO, true);
              window.addEventListener("resize", function () {
                containerOPO.resize();
              })
            }
          } else if (d.data.code == 9007) {
            _self.opoIsError = true;
          }
        })
      },
      /*智能反馈--库龄图数据--feedback_lifetime_overview*/
      feedback_lifetime_overviewFun: function () {
        var _self = this;
        _self.lifetime_overviewIsLoading = true;
        var yx_data = {
          "category": this.query_get_item_category_input_boss,
          "plan_class": this.query_get_plan_class_input_boss,
          "sourcing": this.query_get_sourcing_input_boss,
          "item_big_class": this.query_get_item_big_class_input_boss,
          "item_small_class": this.query_get_item_small_class_input_boss,
          "planner": this.query_get_planner_input_boss,
          "buyer": this.query_get_buyer_input_boss,

          "item": this.certainItem,
          "start_date": this.condition_startDate,
          "end_date": this.condition_endDate,
        }
        common.getData(6, common.url_constitute.feedback_lifetime_overview, 'post', yx_data, function (d) {
          _self.lifetime_overviewIsLoading = false;
          if (d.data.code == 1024) {
            _self.lifetime_overviewIsError = false;
            _self.feedback_lifetime_overviewData = d.data.item_info;
            _self.feedback_lifetime_overviewData_A = _self.feedback_lifetime_overviewData.A;
            _self.feedback_lifetime_overviewData_B = _self.feedback_lifetime_overviewData.B;
            _self.feedback_lifetime_overviewData_C = _self.feedback_lifetime_overviewData.C;
            _self.feedback_lifetime_overviewData_D = _self.feedback_lifetime_overviewData.D;

            var optionBar = {
              tooltip: {
                trigger: 'item',
                formatter: function (params) {
                  return params.seriesName + ":<br />" +
                    params.name + ":" + (params.value * 100).toFixed(2) + "%";
                },
                confine: true
              },
              color: ['#ffbe4c', '#51d489', '#fc7470', '#56b5f1'],
              series: {
                name: '价值占比',
                type: 'pie',
                radius: '90%',
                center: ['50%', '50%'],
                label: {
                  normal: {
                    show: false
                  }
                },
                data: [
                  {value: _self.feedback_lifetime_overviewData_A.value_ratio, name: '30天以下'},
                  {value: _self.feedback_lifetime_overviewData_B.value_ratio, name: '30-60天'},
                  {value: _self.feedback_lifetime_overviewData_C.value_ratio, name: '61-90天'},
                  {value: _self.feedback_lifetime_overviewData_D.value_ratio, name: '90天以上'},
                ],
                itemStyle: {
                  normal: {
                    borderWidth: 1,
                    borderColor: 'white'
                  },
                  emphasis: {
                    shadowBlur: 5,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                  }
                }
              }
            }
            /*var optionBar = {//柱状图
             tooltip: {
             confine: true,
             formatter: function(params){
             return params.seriesName + ":<br />"+
             params.name+":"+ common.numThousand(params.value)
             },
             },
             grid: {
             left: '4%',
             right: '0%',
             bottom: '3%',
             top: '17.5%',
             containLabel: true
             },
             xAxis: {
             name: '时间',
             type: 'category',
             data: common.setDateMonList(_self.feedback_lifetime_overviewData.TIME),
             axisLabel: {
             interval: 0,//横轴信息全部显示
             /!* rotate: 15*!/
             }
             },
             yAxis: [{
             type: 'value',
             name: '库存金额/元',
             splitLine: {show: false},
             axisLabel: {
             formatter: function (params) {
             return common.wan(params);
             }
             }
             }],
             series: [{
             name: '30天以下',
             type: 'bar',
             barWidth: '65%',
             itemStyle: {
             normal: {
             color: '#ffbe4c'
             }
             },
             stack: '库存',
             data: _self.feedback_lifetime_overviewData_A.value
             }, {
             name: '31-60天',
             type: 'bar',
             barWidth: '65%',
             itemStyle: {
             normal: {
             color: '#51d489'
             }
             },
             stack: '库存',
             data: _self.feedback_lifetime_overviewData_B.value
             }, {
             name: '61-90天',
             type: 'bar',
             barWidth: '65%',
             itemStyle: {
             normal: {
             color: '#fc7470'
             }
             },
             stack: '库存',
             data: _self.feedback_lifetime_overviewData_C.value
             }, {
             name: '90天以上',
             type: 'bar',
             barWidth: '65%',
             itemStyle: {
             normal: {
             color: '#56b5f1'
             }
             },
             stack: '库存',
             data: _self.feedback_lifetime_overviewData_D.value
             }, {
             name: '30天以下',
             type: 'line',
             stack: '总量',
             itemStyle: {
             normal: {
             color: '#ffbe4c'
             }
             },
             lineStyle: {
             normal: {
             color: 'rgb(136,136,136)',
             type: 'dashed'
             }
             },
             data: _self.feedback_lifetime_overviewData_A.value
             }, {
             name: '31-60天',
             type: 'line',
             stack: '总量',
             itemStyle: {
             normal: {
             color: '#51d489'
             }
             },
             lineStyle: {
             normal: {
             color: 'rgb(136,136,136)',
             type: 'dashed'
             }
             },
             data: _self.feedback_lifetime_overviewData_B.value
             }, {
             name: '61-90天',
             type: 'line',
             stack: '总量',
             itemStyle: {
             normal: {
             color: '#fc7470'
             }
             },
             lineStyle: {
             normal: {
             color: 'rgb(136,136,136)',
             type: 'dashed'
             }
             },
             data: _self.feedback_lifetime_overviewData_C.value
             }, {
             name: '90天以上',
             type: 'line',
             stack: '总量',
             itemStyle: {
             normal: {
             color: '#56b5f1'
             }
             },
             lineStyle: {
             normal: {
             color: 'rgb(136,136,136)',
             type: 'dashed'
             }
             },
             data: _self.feedback_lifetime_overviewData_D.value
             }]
             }*/

            var containerPie = echarts.init(document.getElementById('containerBar'));
            containerPie.setOption(optionBar, true);
            window.addEventListener("resize", function () {
              containerPie.resize();
            })
          } else if (d.data.code == 9007) {
            _self.lifetime_overviewIsError = true;
          }
        })
      },
      /*智能反馈--库龄表数据--feedback_lifetime_category*/
      feedback_lifetime_categoryFun: function (page, oldPage) {
        var _self = this;
        _self.lifetimeCategoryIsLoading = true;
        if (typeof page == "undefined") {
          page = 1;
        }
        if (page != oldPage) {
          var yx_data = {
            "category": this.query_get_item_category_input_boss,
            "plan_class": this.query_get_plan_class_input_boss,
            "sourcing": this.query_get_sourcing_input_boss,
            "item_big_class": this.query_get_item_big_class_input_boss,
            "item_small_class": this.query_get_item_small_class_input_boss,
            "planner": this.query_get_planner_input_boss,
            "buyer": this.query_get_buyer_input_boss,

            "item": this.certainItem,
            "start_date": this.condition_startDate,
            "end_date": this.condition_endDate,
            page: page
          }
          common.getData(7, common.url_constitute.feedback_lifetime_category, 'post', yx_data, function (d) {
            _self.lifetimeCategoryIsLoading = false;
            if (d.data.code == 1024) {
              _self.feedback_lifetime_categoryData = d.data.life_time_dst;
              _self.lifetimeCategoryIError = false;
            } else if (d.data.code == 9007) {
              _self.lifetimeCategoryIError = true;
            }
          })
        }
      },
    },
  }

</script>

<style>
  @import "../common/css/base.css";
  @import "../common/css/yx.less";
</style>
